import axios from "./axios"
/**
 * 文件上传
 * @param {files} data 
 * @returns 
 */

export const upload = (data) => {
  return axios.post('/common/upload', data)
}
/**
 * 文件下载、查看
 * @param {id} data 
 * @returns 
 */

export const download = (data) => {
  return axios.get('common/download/'+data)
}
/**
 * 文件前缀
 * @param {} data 
 * @returns 
 */

export const path = (data) => {
  return axios.get('common/download/')
}
/**
 * 文件删除
 * @param {id} data 
 * @returns 
 */

export const delimage = (data) => {
  return axios.delete('common/del-file/' + data)
}